import {initConfigPanel} from './ui/configPanel';
import {InterceptorManager} from './interceptor/manager';
import {inlineStyles} from './utils/cssLoader';

console.log("Hello, Request-Redirector!🤪")

// 初始化拦截器
const interceptorManager = new InterceptorManager();
interceptorManager.init();

// 添加样式到页面
GM_addStyle(inlineStyles);

// 初始化面板
initConfigPanel();

GM_registerMenuCommand("HTTP请求拦截配置", () => {
    let modal = document.getElementById('configModal');
    if (modal) {
        modal.classList.add('show');
    }
}, 'C');